//
//	MCCreatePlanaddDataModel.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class MCCreatePlanaddDataModel : NSObject, NSCoding, Mappable{

	var actionId : Int?
	var actionNumber : Int?
	var actionTime : Int?
	var actionType : Int?
	var actionWeight : Int?
	var sort : Int?
    var previewUrl:String?
    var zhName:String?
    var actionLabel:String?

	class func newInstance(map: Map) -> Mappable?{
		return MCCreatePlanaddDataModel()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		actionId <- map["actionId"]
		actionNumber <- map["actionNumber"]
		actionTime <- map["actionTime"]
		actionType <- map["actionType"]
		actionWeight <- map["actionWeight"]
		sort <- map["sort"]
		previewUrl <- map["previewUrl"]
        zhName <- map["zhName"]
        actionLabel <- map["actionLabel"]
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         actionId = aDecoder.decodeObject(forKey: "actionId") as? Int
         actionNumber = aDecoder.decodeObject(forKey: "actionNumber") as? Int
         actionTime = aDecoder.decodeObject(forKey: "actionTime") as? Int
         actionType = aDecoder.decodeObject(forKey: "actionType") as? Int
         actionWeight = aDecoder.decodeObject(forKey: "actionWeight") as? Int
         sort = aDecoder.decodeObject(forKey: "sort") as? Int
        previewUrl = aDecoder.decodeObject(forKey: "previewUrl") as? String
        zhName = aDecoder.decodeObject(forKey: "zhName") as? String
        actionLabel = aDecoder.decodeObject(forKey: "actionLabel") as? String
	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if actionId != nil{
			aCoder.encode(actionId, forKey: "actionId")
		}
		if actionNumber != nil{
			aCoder.encode(actionNumber, forKey: "actionNumber")
		}
		if actionTime != nil{
			aCoder.encode(actionTime, forKey: "actionTime")
		}
		if actionType != nil{
			aCoder.encode(actionType, forKey: "actionType")
		}
		if actionWeight != nil{
			aCoder.encode(actionWeight, forKey: "actionWeight")
		}
		if sort != nil{
			aCoder.encode(sort, forKey: "sort")
		}
        
        if previewUrl != nil {
            aCoder.encode(previewUrl, forKey: "previewUrl")
        }
        
        if zhName != nil {
            aCoder.encode(zhName, forKey: "zhName")
        }
        
        if actionLabel != nil {
            aCoder.encode(actionLabel, forKey: "actionLabel")
        }
        
	}

}
